import { AppCTX } from "../../types/koaExtend";
import { createBrandApiMWRouter } from "../../middleware/brand-api/brandAdminChecker"
const router = createBrandApiMWRouter();
import { aggrActivityStatsOfSpokesmanByActivityID } from "../../service/activityStatService"


// 获取活动收入统计
router.get('/spn/:spokesmanId/activity/:activityId/statistics/income', async(ctx: AppCTX, next) => {
  const { spokesmanId, activityId } = ctx.params;
  const {userId} = ctx
  
  const aggrRet = await aggrActivityStatsOfSpokesmanByActivityID(activityId, spokesmanId)

  ctx.body = aggrRet
})

export default router;